import request from "@/request";
import { AxiosResponse } from "axios";

export const sexOptions = [
  { label: "不公开", value: "Unknow" },
  { label: "男", value: "Man" },
  { label: "女", value: "Woman" },
];

export interface FormValue {
  userName: string;
  realName: string;
  nickName: string;
  email: string;
  phone: string;
  sex: string;
  avatar: string;
}

export const getProfile = () => {
  return request({
    url: "/user/profile",
    method: "get",
  });
};

export const submitProfile = (data: any) => {
  return request({
    url: "/user/profile/update",
    method: "post",
    data,
  });
};
